package adminuser

import (
	"gorm.io/gorm"
	"wonlicsys/pkg/jwt"
)

func(rsp *AdminService) Login(db *gorm.DB,adminUser *ReqAdminUserLogin) error {
	jwtToken,err := jwt.GetToken(adminUser.UserId,adminUser.UserName)
	if err != nil{
		return err
	}
	rsp.LogService.JwtToken = jwtToken
	return nil
}